package com.wongsir.step2.tiny_ioc.factory;

import com.wongsir.step2.tiny_ioc.BeanDefinition;

/**
 * step2:AutowierCapable-可自动装配的bean工厂
 * @author wongsir
 * @date 2018年9月13日
 */
public class AutowireCapableBeanFactory extends AbstractBeanFactory{

	@Override
	protected Object doCreateBean(BeanDefinition beanDefinition) {
		try {
			Object bean = beanDefinition.getBeanClass().newInstance();
			return bean;
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		return null;
	}

}
